// import { pathOr } from 'ramda';
import initServerInstance from '../server/initServerInstance';

if (require.main === module) {
	(async () => {
		const server = await initServerInstance({
			loggerConfig: {
				name: 'upgrade',
				alwaysCreate: true,
			},
		});
		const {
			app: { model },
		} = server;
		const { Notification } = model;

		await Notification.updateMany(
			{ category: '系统消息' },
			{ $set: { category: '告警通知' } }
		);
		process.exit();
	})();
}
